<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="product" tagdir="/WEB-INF/tags/product"%>
<%@ taglib prefix="order" tagdir="/WEB-INF/tags/order"%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<c:choose>
		<c:when test="${not empty shippingRateList}">
			<c:forEach items="${shippingRateList}" var="shippingRate" varStatus="varStatus">
				<tr>
					<td width="20%">
						<input type="radio" id="shippingRate${shippingRate.shippingRateId}" name="shippingRateId" value="${shippingRate.shippingRateId}"
						 onchange="changeShippingMethod(this)" onclick="this.blur();this.focus();" supportSpecifyingDeliveryTime="${shippingRate.shippingMethod.supportSpecifyingDeliveryTime}" validConf="required">
						<label for="shippingRate${shippingRate.shippingRateId}">
							${shippingRate.shippingMethod.shippingMethodName}
						</label>
					</td>
					<td width="10%">
						${shippingRate.shippingMethod.deliveryTime}
					</td>
					<td>
						${shippingRate.shippingMethod.shippingMethodDetail}
					</td>
				</tr>	
			</c:forEach>
		</c:when>
		<c:otherwise>
			<tr>
				<td>
					<b><font color="red"><fmt:message key="checkout.destinationUnreachable"/></font></b>
					<input type="hidden" name="paymentMethodId" validConf="required"/>
				</td>
			</tr>
		</c:otherwise>
	</c:choose>
</table>

<script type="text/javascript">
$j(document).ready(function () {
	//选择第一个配送方式
	<c:if test="${not empty shippingRateList}">
		$j('input[name="shippingRateId"]:first').attr("checked",true).change();
	</c:if>
});
</script>
